﻿import java.util.Scanner;

public class N_CountWord {
	public static void main(String[] args) {
		Scanner input =new Scanner(System.in);
		System.out.println("请输入一个字符串：");
		String words=input.next();
		System.out.println("请输入要查找的字符：");
		String cWords=input.next();
		
		
		int count=0;
		for (int i = 0; i < words.length(); i++) {
			String s=words.substring(i, i+1);
			if(s.equals(cWords)){
			count++;
		}
		}
		System.out.println("“"+words+"”"+"中包含"+count+"个"+cWords);
	}